/*
 * ClockSource.h
 *
 *   This is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2 of the License, or (at your option) any later version.
 *
 *   This software is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *  Created on: 2010-1-2
 *      Author: Huang Haiyang
 */

#ifndef CLOCKSOURCE_H_
#define CLOCKSOURCE_H_

#include <e32def.h>

namespace service
	{

	class ClockSource
		{
	public:
		ClockSource();
		
		inline TUint32 TickPeriod() const
			{
			return iTickPeriod;
			}
		
	public:
		static TUint32 Ticks();
		
	private:
		static TUint32 initialSystemTickPeriod();
		
		TUint32 iTickPeriod;		
		};

	}

#endif /* CLOCKSOURCE_H_ */
